package com.ffcs.web.model.entity;
// default package

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * PingLun entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wechat_PingL")
public class PingLun implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer picNewsId;
	private Integer userId;
	private String userName;
	private Integer beiUserId;
	private String beiUserName;
	private Date addTime;
	@Transient
	private String addTimeStr;
	private Integer beiPingLcnt;
	private String content;
	@Transient
	private String headimgurl;

	// Constructors

	/** default constructor */
	public PingLun() {
	}

	/** minimal constructor */
	public PingLun(Integer picNewsId, Integer userId, String userName,
			Timestamp addTime, Integer beiPingLcnt) {
		this.picNewsId = picNewsId;
		this.userId = userId;
		this.userName = userName;
		this.addTime = addTime;
		this.beiPingLcnt = beiPingLcnt;
	}

	/** full constructor */
	public PingLun(Integer picNewsId, Integer userId, String userName,
			Integer beiUserId, String beuUserName, Date addTime,
			Integer beiPingLcnt) {
		this.picNewsId = picNewsId;
		this.userId = userId;
		this.userName = userName;
		this.beiUserId = beiUserId;
		this.beiUserName = beuUserName;
		this.addTime = addTime;
		this.beiPingLcnt = beiPingLcnt;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "picNewsId", nullable = false)
	public Integer getPicNewsId() {
		return this.picNewsId;
	}

	public void setPicNewsId(Integer picNewsId) {
		this.picNewsId = picNewsId;
	}

	@Column(name = "userId", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "userName", nullable = false, length = 50)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "beiUserId")
	public Integer getBeiUserId() {
		return this.beiUserId;
	}

	public void setBeiUserId(Integer beiUserId) {
		this.beiUserId = beiUserId;
	}

	@Column(name = "beiUserName", length = 50)
	public String getBeiUserName() {
		return this.beiUserName;
	}

	public void setBeiUserName(String beiUserName) {
		this.beiUserName = beiUserName;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "addTime", nullable = false, length = 19)
	public Date getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	@Column(name = "beiPingLCnt", nullable = false)
	public Integer getBeiPingLcnt() {
		return this.beiPingLcnt;
	}

	public void setBeiPingLcnt(Integer beiPingLcnt) {
		this.beiPingLcnt = beiPingLcnt;
	}

	@Column(name = "content", nullable = false, length = 1000)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Transient
	public String getAddTimeStr() {
		return addTimeStr;
	}

	public void setAddTimeStr(String addTimeStr) {
		this.addTimeStr = addTimeStr;
	}

	public String getHeadimgurl() {
		return headimgurl;
	}

	public void setHeadimgurl(String headimgurl) {
		this.headimgurl = headimgurl;
	}
}